package cn.sh.yhk.mapper.business;

import cn.sh.yhk.model.business.InviteBids;
import cn.sh.yhk.model.business.InviteBidsExample;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

@Mapper
public interface InviteBidsMapper {
    @SelectProvider(type = InviteBidsSqlProvider.class, method = "countByExample")
    long countByExample(InviteBidsExample example);

    @DeleteProvider(type = InviteBidsSqlProvider.class, method = "deleteByExample")
    int deleteByExample(InviteBidsExample example);

    @Insert({
            "insert into invite_bids (id, number_id, ",
            "car_model, end_time, ",
            "item_name, invite_id, ",
            "car_model_number, car_explain, ",
            "reggion, privince, ",
            "city, bugget, type, ",
            "invite_bids_brief, url, ",
            "other, release_time, ",
            "remarks, firm, latitude, ",
            "longitude, state, ",
            "create_time, modify_time, ",
            "invite_bids_detail)",
            "values (#{id,jdbcType=INTEGER}, #{numberId,jdbcType=VARCHAR}, ",
            "#{carModel,jdbcType=VARCHAR}, #{endTime,jdbcType=TIMESTAMP}, ",
            "#{itemName,jdbcType=VARCHAR}, #{inviteId,jdbcType=VARCHAR}, ",
            "#{carModelNumber,jdbcType=VARCHAR}, #{carExplain,jdbcType=VARCHAR}, ",
            "#{reggion,jdbcType=VARCHAR}, #{privince,jdbcType=VARCHAR}, ",
            "#{city,jdbcType=VARCHAR}, #{bugget,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, ",
            "#{inviteBidsBrief,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, ",
            "#{other,jdbcType=VARCHAR}, #{releaseTime,jdbcType=VARCHAR}, ",
            "#{remarks,jdbcType=VARCHAR}, #{firm,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, ",
            "#{longitude,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, ",
            "#{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}, ",
            "#{inviteBidsDetail,jdbcType=LONGVARCHAR})"
    })
    int insert(InviteBids record);

    @InsertProvider(type = InviteBidsSqlProvider.class, method = "insertSelective")
    int insertSelective(InviteBids record);

    @SelectProvider(type = InviteBidsSqlProvider.class, method = "selectByExampleWithBLOBs")
    @Results({
            @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER),
            @Result(column = "number_id", property = "numberId", jdbcType = JdbcType.VARCHAR),
            @Result(column = "car_model", property = "carModel", jdbcType = JdbcType.VARCHAR),
            @Result(column = "end_time", property = "endTime", jdbcType = JdbcType.TIMESTAMP),
            @Result(column = "item_name", property = "itemName", jdbcType = JdbcType.VARCHAR),
            @Result(column = "invite_id", property = "inviteId", jdbcType = JdbcType.VARCHAR),
            @Result(column = "car_model_number", property = "carModelNumber", jdbcType = JdbcType.VARCHAR),
            @Result(column = "car_explain", property = "carExplain", jdbcType = JdbcType.VARCHAR),
            @Result(column = "reggion", property = "reggion", jdbcType = JdbcType.VARCHAR),
            @Result(column = "privince", property = "privince", jdbcType = JdbcType.VARCHAR),
            @Result(column = "city", property = "city", jdbcType = JdbcType.VARCHAR),
            @Result(column = "bugget", property = "bugget", jdbcType = JdbcType.VARCHAR),
            @Result(column = "type", property = "type", jdbcType = JdbcType.VARCHAR),
            @Result(column = "invite_bids_brief", property = "inviteBidsBrief", jdbcType = JdbcType.VARCHAR),
            @Result(column = "url", property = "url", jdbcType = JdbcType.VARCHAR),
            @Result(column = "other", property = "other", jdbcType = JdbcType.VARCHAR),
            @Result(column = "release_time", property = "releaseTime", jdbcType = JdbcType.VARCHAR),
            @Result(column = "remarks", property = "remarks", jdbcType = JdbcType.VARCHAR),
            @Result(column = "firm", property = "firm", jdbcType = JdbcType.VARCHAR),
            @Result(column = "latitude", property = "latitude", jdbcType = JdbcType.VARCHAR),
            @Result(column = "longitude", property = "longitude", jdbcType = JdbcType.VARCHAR),
            @Result(column = "state", property = "state", jdbcType = JdbcType.INTEGER),
            @Result(column = "create_time", property = "createTime", jdbcType = JdbcType.TIMESTAMP),
            @Result(column = "modify_time", property = "modifyTime", jdbcType = JdbcType.TIMESTAMP),
            @Result(column = "invite_bids_detail", property = "inviteBidsDetail", jdbcType = JdbcType.LONGVARCHAR)
    })
    List<InviteBids> selectByExampleWithBLOBs(InviteBidsExample example);

    @SelectProvider(type = InviteBidsSqlProvider.class, method = "selectByExample")
    @Results({
            @Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER),
            @Result(column = "number_id", property = "numberId", jdbcType = JdbcType.VARCHAR),
            @Result(column = "car_model", property = "carModel", jdbcType = JdbcType.VARCHAR),
            @Result(column = "end_time", property = "endTime", jdbcType = JdbcType.TIMESTAMP),
            @Result(column = "item_name", property = "itemName", jdbcType = JdbcType.VARCHAR),
            @Result(column = "invite_id", property = "inviteId", jdbcType = JdbcType.VARCHAR),
            @Result(column = "car_model_number", property = "carModelNumber", jdbcType = JdbcType.VARCHAR),
            @Result(column = "car_explain", property = "carExplain", jdbcType = JdbcType.VARCHAR),
            @Result(column = "reggion", property = "reggion", jdbcType = JdbcType.VARCHAR),
            @Result(column = "privince", property = "privince", jdbcType = JdbcType.VARCHAR),
            @Result(column = "city", property = "city", jdbcType = JdbcType.VARCHAR),
            @Result(column = "bugget", property = "bugget", jdbcType = JdbcType.VARCHAR),
            @Result(column = "type", property = "type", jdbcType = JdbcType.VARCHAR),
            @Result(column = "invite_bids_brief", property = "inviteBidsBrief", jdbcType = JdbcType.VARCHAR),
            @Result(column = "url", property = "url", jdbcType = JdbcType.VARCHAR),
            @Result(column = "other", property = "other", jdbcType = JdbcType.VARCHAR),
            @Result(column = "release_time", property = "releaseTime", jdbcType = JdbcType.VARCHAR),
            @Result(column = "remarks", property = "remarks", jdbcType = JdbcType.VARCHAR),
            @Result(column = "firm", property = "firm", jdbcType = JdbcType.VARCHAR),
            @Result(column = "latitude", property = "latitude", jdbcType = JdbcType.VARCHAR),
            @Result(column = "longitude", property = "longitude", jdbcType = JdbcType.VARCHAR),
            @Result(column = "state", property = "state", jdbcType = JdbcType.INTEGER),
            @Result(column = "create_time", property = "createTime", jdbcType = JdbcType.TIMESTAMP),
            @Result(column = "modify_time", property = "modifyTime", jdbcType = JdbcType.TIMESTAMP)
    })
    List<InviteBids> selectByExample(InviteBidsExample example);

    @UpdateProvider(type = InviteBidsSqlProvider.class, method = "updateByExampleSelective")
    int updateByExampleSelective(@Param("record") InviteBids record, @Param("example") InviteBidsExample example);

    @UpdateProvider(type = InviteBidsSqlProvider.class, method = "updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") InviteBids record, @Param("example") InviteBidsExample example);

    @UpdateProvider(type = InviteBidsSqlProvider.class, method = "updateByExample")
    int updateByExample(@Param("record") InviteBids record, @Param("example") InviteBidsExample example);
}